Overview of the Crystal Report Engine Object Model

Object Hierarchy

The Crystal Report Engine Object Model for the Crystal Report Engine Automation Server provides all of the power of the Crystal Report Engine in an easy to use object-oriented hierarchy. The following diagram illustrates this object hierarchy:

Object Naming Conflicts

If your project includes other libraries that contain objects named identically to those found in the Crystal Report Engine Object Model, you will encounter conflicts unless you reference the objects by using a prefix. For example, if you have included the DAO Library with the Crystal Report Engine Object Model in your project, both libraries include a Database Object. In order to avoid conflicts, you must prefix the objects as follows:

CRPEAuto.Database

for the Crystal Report Engine Object Model, or

DAO.Database

for the DAO Library.

Note:    You must always prefix when referencing the Font Object. Visual Basic includes a VB Font Object that is always included when creating a project, so conflicts will always occur unless the object is properly referenced.(For example, CRPEAuto.Font).

Object Model Events

Events are only available when using Visual Basic 5.0 or later. To use events, you must first declare the desired Object (Report or Window) as Public and With Events in the General, Declarations area of the module.

For example, declare the Report object as follows:

Public WithEvents reportVar As CRPEAuto.Report

The Visual Basic code screen will then list reportVar in the Object list, with events listed in the Procedure list. Adding code to an event will cause this code to be run whenever the event occurs, which in turn will be followed by the default behavior for the event. For complete information on handling events, see Handling preview window events.



Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com